<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        // ==============第1题==================
        // function Person() {

        //     this.age = 28

        //     return 50

        // }

        // var p = new Person()

        // console.log(p.age) // 28


        // ==============第2题==================
        // function Person() {

        //     this.age = 28

        //     return Number(50)

        // }

        // var p = new Person()

        // console.log(p.age) //28

        // ==============第3题==================

        function Person() {

            this.gender = '男'

            return {
                gender: '未知'
            }

        }



        var p = new Person()

        console.log(p.gender) // 未知
    </script>
</body>

</html>